package com.service.impl;

import com.dao.UserMapper;
import com.entity.UserEntity;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    public UserMapper dao;

    @Override
    public List<UserEntity> selectPagedUsers(int pageNum,int pageSize){
        return dao.selectPagedUsers(pageNum,pageSize);
    }

    @Override
    @Transactional
    public void txServices() {
        dao.deleteById();
        dao.update();
    }
}
